Skip to content

fix(CodeBlock): remove deprecated textId prop from ClipboardCopyButton example#12242

Open
fallmo wants to merge 1 commit intopatternfly:mainfrom
fallmo:example-fix-1
Open

fix(CodeBlock): remove deprecated textId prop from ClipboardCopyButton example#12242
fallmo wants to merge 1 commit intopatternfly:mainfrom
fallmo:example-fix-1

Conversation

@fallmo
Copy link
Contributor

@fallmo fallmo commented Feb 13, 2026

Changes:
Removes deprecated textId prop in ClipboardCopyButton component in the following example files:

  • packages/react-core/src/components/CodeBlock/examples/CodeBlockBasic.tsx
  • packages/react-core/src/components/CodeBlock/examples/CodeBlockExpandable.tsx

Summary by CodeRabbit

  • Refactor
    • Streamlined clipboard copy functionality in code block examples by simplifying how copied content is identified, maintaining existing copy functionality while reducing component complexity.

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

Walkthrough

Removed the textId prop from ClipboardCopyButton component in two CodeBlock example files. This changes how the copy action identifies the source text, relying on the passed text argument instead of a specific DOM element reference.

Changes

Cohort / File(s) Summary
CodeBlock Example Updates
packages/react-core/src/components/CodeBlock/examples/CodeBlockBasic.tsx, packages/react-core/src/components/CodeBlock/examples/CodeBlockExpandable.tsx
Removed textId prop from ClipboardCopyButton usage, eliminating the explicit DOM element reference for clipboard operations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • thatblindgeye
  • nicolethoen
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the deprecated textId prop from ClipboardCopyButton in CodeBlock examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@patternfly-build
Copy link
Collaborator

patternfly-build commented Feb 13, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants